"""plg URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import re_path, path
from .views import ContactNetworkView, PersonListView, NetWorkView, PersonDetailView, LocationDetailView, \
    GnderListView, LocationListlView, PageRankListView, InitNetWorkView

urlpatterns = [
    # 接触网络
    re_path(r'^contacts[/]?$', ContactNetworkView.as_view()),
    re_path(r'^persons[/]?$', PersonListView.as_view()),
    path("persons/<slug:mobile>", PersonDetailView.as_view()),
    re_path(r'^network[/]?$', NetWorkView.as_view()),
    re_path(r'^network/init[/]?$', InitNetWorkView.as_view()),
    # location person
    path(r'location/<slug:location_id>/', LocationDetailView.as_view()),
    path(r'location/', LocationListlView.as_view()),


    # 统计性别
    path(r'gender/', GnderListView.as_view()),

    # 页面排名算法

    path(r'page_rank/', PageRankListView.as_view()),

]
